The present application relates to information processing devices, information processing methods, programs, and recording media, and, more particularly, to an information processing device, an information processing method, a program, and a recording medium capable of realizing a user-friendly and low-cost network interface card.
As an example of a network-based data communication system, the Internet is known as a wide-area communication network. In addition, a local area network (LAN) such as an Ethernet (registered trademark) network or a token ring (registered trademark) network constructed in a narrow area, for example, on the premises of a company or in a single building is known.
For example, a terminal such as a personal computer connected to an Ethernet network receives an Ethernet frame. In the terminal, DMA (Direct Memory Access) processing is performed with a memory controller to transmit the received frame to a memory. In addition, information on the fact that this DMA processing has been completed is transmitted to a CPU (Central Processing Unit), whereby this Ethernet frame receiving processing in the terminal is completed.
However, if the transmission of all frames acquired by a network interface card connected to a communication medium such as a cable is performed using the DMA technique, terminal capability is markedly decreased. Accordingly, address filtering processing is usually performed. In the address filtering processing, an address included in header information of a frame acquired by a network interface card is compared with address information stored in a table, which has been set in advance, to check whether the address included in the communication data is stored in the table.
Currently, as network communication becomes faster, a technique of performing the above-described address filtering processing within a network interface card using a dedicated function provided therefor without requiring a CPU to execute software for the address filtering processing is becoming increasingly popular (see, for example, Japanese Unexamined Patent Application Publication No. 2001-230813).
FIG. 1 is a block diagram showing an exemplary configuration of a network interface card for performing address filtering processing. A frame acquisition unit 21 acquires an Ethernet frame from a communication medium, and transmits the acquired frame to an FCS checking unit 22.
The FCS checking unit 22 compares data (a code) stored in an FCS (Frame Check Sequence) field included in the Ethernet frame with a CRC (Cyclic Redundancy Check) code calculated by a CRC calculation unit 23 to determine whether the acquired frame is corrupted. The CRC calculation unit 23 calculates a 32-bit CRC code on the basis of data included in a portion other than the FCS field of the acquired frame.
If the FCS checking unit 22 checks that the acquired frame is not corrupted, an address filtering unit 24 performs address filtering processing on the basis of a destination MAC address included in the frame and an address table stored by an address table management unit 25, and then transmits the frame to a DMA control unit 26. The address table management unit 25 has an address table storing a MAC address provided for the network interface card (unicast MAC address) and a multicast MAC address.
The DMA control unit 26 performs DMA processing to transmit data of the frame received from the address filtering unit 24 to a memory.
FIG. 2 is a flowchart describing an example of frame receiving processing performed in the network interface card shown in FIG. 1. In step S1, the frame acquisition unit 21 acquires an Ethernet frame from a communication medium, and transmits the acquired frame to the FCS checking unit 22 and the CRC calculation unit 23.
In step S2, the CRC calculation unit 23 calculates a 32-bit CRC code on the basis of data included in a portion other than the FCS field of the frame acquired in step S1.
In step S3, the FCS checking unit 22 compares data (a code) stored in the FCS field of the frame acquired in step S1 with the CRC code calculated in step S2 to determine whether the codes coincide. If the codes coincide, it is determined that the frame acquired in step S1 is not corrupted, and then the process proceeds to step S4.
In step S4, the address filtering unit 24 checks a destination MAC address included in the frame.
In step S5, the address filtering unit 24 determines whether the destination MAC address checked in step S4 is included in an address table stored by the address table management unit 25.
FIG. 3 is a diagram showing an exemplary address table stored by the address table management unit 25. An address table shown in FIG. 3 stores three (three types of) MAC addresses corresponding to indexes 0, 1, and 2. Here, each of the MAC addresses is composed of six octets (48 bits) which are separated by colons in units of octets and each of which is represented by a hexadecimal number.
A MAC address corresponding to the index 0 is defined as a unicast MAC address, and MAC addresses corresponding to the indexes 1 and 2 are defined as multicast MAC addresses. A frame in which the MAC address corresponding to the index 0, 1, or 2 is set as a destination MAC address will be received by a terminal implementing the network interface card.
Referring back to FIG. 2, in step S5, whether the destination MAC address checked in step S4 coincides with any one of the MAC addresses corresponding to the indexes 0, 1, and 2 is determined.
In step S5, if it is determined that the destination MAC address checked in step S4 is included in the address table stored by the address table management unit 25, the process proceeds to step S6. In step S6, the DMA control unit 26 performs DMA transmission. That is, data included in the frame acquired in step S1 is transmitted to a memory by performing the DMA processing.
On the other hand, if it is determined in step S3 that the data (code) included in the FCS field of the frame acquired in step S1 does not coincide with the CRC code calculated in step S2, or if it is determined in step S5 that the destination MAC address checked in step S4 is not included in the address table, the process proceeds to step S7. In step S7, the frame acquired in step S1 is removed.
Currently, multicast communication is in high demand in many applications, and the number of MAC addresses to be stored in an address table is therefore increased. However, since there is a limit to a memory capacity, sometimes, the required number of MAC addresses cannot be stored in a memory. In order to resolve this difficulty, a solution can be considered in which the hash values of MAC addresses are calculated, and only the calculated hash values are stored in an address table. Consequently, the consumption of the memory capacity can be reduced.
For example, if a 6-bit hash value is stored in an address table instead of a 48-bit MAC address, the size of the address table can be reduced.
However, in order to compute the above-described hash value, an additional functional block for the computation has to be implemented in a network interface card.
That is, if address filtering processing is performed using an address table in which hash values are stored, the address filtering unit 24 causes a functional block for computing a hash value to compute the hash value of a destination MAC address included in an acquired frame, and then performs address filtering processing on the basis of the result of the computation (the hash value of the destination MAC address) and an address table stored by the address table management unit 25. In this case, the functional block for computing the hash value of the destination MAC address has to be disposed.
Thus, in a known technique, the maximum number of addresses capable of being stored in an address table is not sufficient. In order to increase the number, the configuration of a network interface card is required to be changed. Accordingly, it is difficult to realize a user-friendly and low-cost network interface card.